﻿namespace LogManager.Gui.Views
{
    using LogManager.TestUtility;
    using NUnit.Framework;

    [TestFixture]
    [RequiresSTA]
    public class TestCheckLocationsView
    {
        [Test]
        public void CheckLocationsView_Ctor_Instatiation_Ok()
        {
            var view = new CheckLocationsView();
        }

        [Test]
        public void CheckLocationsView_Ctor_CheckBinding_Ok()
        {
            var view = new CheckLocationsView();
            view.DataContext = view.CreateFakeViewModel();
            WpfBindingTester.CheckViewBindings(view);
        }

        [Test]
        public void CheckLocationsView_ViewModel_ViewModelMatchesDataContext_Matches()
        {
            var view = new CheckLocationsView();
            view.DataContext = view.CreateFakeViewModel();
            Assert.AreEqual(view.ViewModel, view.DataContext);

            view.ViewModel = view.CreateFakeViewModel();
            Assert.AreEqual(view.ViewModel, view.DataContext);
        }
    }
}
